package com.java1234.service.impl;

import com.java1234.dao.MemberShipDao;
import com.java1234.entity.MemberShip;
import com.java1234.service.MemberShipService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * Created by dengwubo on 2017/8/18.
 */
@SuppressWarnings("all")
@Service
public class MemberShipServiceImpl implements MemberShipService {

    @Autowired
    MemberShipDao memberShipDao;


    public MemberShip login(Map<String,Object> map) {
        return memberShipDao.login(map);
    }

    @Override
    public List<MemberShip> checkRelationByGroup(String id) {
        return memberShipDao.checkRelationByGroup(id);
    }

    @Override
    public int deleteAllGroupByUserId(String userId) {
        return memberShipDao.removeRelationByUser(userId);
    }

    @Override
    public int add(MemberShip memberShip) {
        return memberShipDao.add(memberShip);
    }
}
